package com.hhc.repository;

import com.hhc.entity.OperationLogDO;
import java.time.LocalDateTime;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * <p>
 *   操作日志Repository接口
 * </p>
 * @author pc
 */
public interface OperationLogRepository extends JpaRepository<OperationLogDO, Long> {

    @EntityGraph(attributePaths = {"user"})
    Page<OperationLogDO> findAllByUserIdAndOperationTypeAndModuleNameAndCreateTimeBetween(
            Long userId, String operationType, String moduleName, LocalDateTime startTime, LocalDateTime endTime, Pageable pageable);
}